#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    int largestCombination(vector<int>& candidates) {
        vector<int> bit(32, 0);
        function<void(int)> f = [&bit](int a) {
            int i = 0;
            while (a)
            {
                if ((a & 1) == 1) bit[i]++;
                ++i;
                a >>= 1;
            }
            };
        for (auto& e : candidates)
        {
            f(e);
        }
        int res = 0;
        for (auto& e : bit) res = max(res, e);
        return res;
    }
};